<template>
	<view>
		<web-view :webview-styles="webviewStyles" :src="url" @message="callback"></web-view>
	</view>
</template>


<script>
	export default {
		data() {
			return {
				url: '',
				webviewStyles: {}
			};
		},
		onLoad: function(option) {
			if (option) {
				this.url = option.url;
			}
			console.log(this.url)
		},
		onShow: function() {},

		methods: {
			callback(e) {}
		},
		// 右上角返回
		onNavigationBarButtonTap(e) {
			if (e.index === 0) {
				uni.switchTab({
					url: '../index/index'
				});
			}
		},
	};
</script>

<style>

</style>
